// components/rotationChart/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    imgList: {
      type: Array,
      value: []
    },
    title: {
      type: String,
      value: ''
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    currentIndex: 0,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    changeSwiper: function (e) {
      this.setData({
        currentIndex: e.detail.current
      })
    },
    previewImage:function(e){
      let that=this,
      index = that.data.currentIndex
      ,urls=that.properties.imgList[index].img
      wx.previewImage({
        urls:[urls],
      })
    },
  }
})
